"""
brute timeout
"""

class Solution:
    # @param {integer[]} nums
    # @param {integer} target
    # @return {integer[]}
    def twoSum(self, nums, target):
        """
        :type nums: integer[]
        :type target: integer
        """
        h = {}
        for i in range(0, len(nums)):
            h[nums[i]] = i
        for i in range(0, len(nums)):
            if h.has_key(target-nums[i]):
                j = h[target-nums[i]]
                if i != j:
                    return i+1, j+1

